<template>
    <el-dialog v-model="show" title="" width="340" align-center>
        <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
            <el-tab-pane label="扫码登录" name="first">
                <div class="aic">
                    <img src="/src/assets/system/code.png" alt="">
                </div>
                <div class="tip aic">
                    请使用手机支付宝扫码
                </div>
                <div class="tip aic">
                    使用帮助ㅣ下载手机支付宝
                </div>
            </el-tab-pane>
            <el-tab-pane label="账密登录" name="second"></el-tab-pane>
        </el-tabs>
        <template #footer>
            <div class="dialog-footer">
                <el-button type="primary" @click="submit()" color="#0071bb">确定</el-button>
                <el-button @click="close()">取消</el-button>
            </div>
        </template>
    </el-dialog>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import type { TabsPaneContext } from 'element-plus'

const activeName = ref('first')

const handleClick = (tab: TabsPaneContext, event: Event) => {
  console.log(tab, event)
}
const emit = defineEmits(['close','submit']);
// 取消
const close = () => {
    emit('close')
}
const submit = () => {
    emit('submit')
}
const show = ref<boolean>(true)
</script>

<style lang="scss" scoped>
.aic{
    display: flex;
    justify-content: center;
}
.tip{
    font-size: 12px;
    color: #4D4D4D;
    margin-top: 10px;
}
</style>
<style>
.demo-tabs > .el-tabs__content {
  padding: 32px;
  color: #6b778c;
  font-size: 32px;
  font-weight: 600;
}
</style>